import network from "../network"


//添加新闻
function addNewsApi(option) {
    return network({
        method: "post",
        url: "/newsList/addnews",
        data: option.data,
    })
}

//显示新闻
function searchNewsApi(option) {
    return network({
        method: "get",
        url: "/newsList/content",
        params: option.params,
    })
}

//修改新闻
function editNewsApi(option) {
    return network({
        method: "put",
        url: "/newsList",
        params: option.params,
        data: option.data,
    })
}


//删除新闻
function deleteNewsApi(option) {
    return network({
        method: "delete",
        url: "/newsList/delete",
        params: option.params,
    })
}

export {
    addNewsApi,
    searchNewsApi,
    editNewsApi,
    deleteNewsApi
}
